import 'package:get/get.dart';

import '../modules/home/index.dart';
import '../modules/setting/index.dart';
import '../root_view.dart';

part 'app_routes.dart';

class AppPages {
  AppPages._();

  static const INITIAL = Routes.HOME;

  static final routes = [
    GetPage(
      name: _Paths.SPLASH,
      page: () => const SplashPagePage(),
      binding: SplashPageBinding(),
      preventDuplicates: true,
    ),
    GetPage(
      name: _Paths.HOME,
      page: () => const HomeView(),
      binding: HomeBinding(),
      preventDuplicates: true,
      participatesInRootNavigator: true,
      children: [
        GetPage(
          name: _Paths.Trade,
          page: () => const TradeView(),
          binding: TradeBinding(),
        ),
        GetPage(
          name: _Paths.Found,
          page: () => const FoundView(),
          binding: FoundBinding(),
        ),
        GetPage(
          name: _Paths.Store,
          page: () => const StoreView(),
          binding: StoreBinding(),
        ),
        GetPage(
          name: _Paths.Mine,
          page: () => const MineView(),
        ),
      ],
    ),
    GetPage(
      name: _Paths.SETTING,
      page: () => const SettingView(),
      binding: SettingBinding(),
      preventDuplicates: true,
    ),
  ];
}
